package com.objectcarpentry.kaylee.ui.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil;

import com.objectcarpentry.kaylee.KayleePlugin;
import com.objectcarpentry.kaylee.ui.views.LibraryView;

public class RenamePlaylistHandler extends AbstractHandler {

	
	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		LibraryView lv = (LibraryView) HandlerUtil.getActivePart(event);
		lv.rename(HandlerUtil.getCurrentSelection(event));
		return null;
	}
	
}
